package com.example.demo.sys.service.bo;

import com.example.demo.core.tree.TreeNode;
import com.example.demo.sys.entity.Menu;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

@Data
public class MenuBO extends TreeNode {
    private String title;
    private String key;
    private String icon;
    private Integer sort;

    public static MenuBO convert(Menu item) {
        if (item == null) {
            return null;
        }
        MenuBO result = new MenuBO();
        BeanUtils.copyProperties(item,result);

        return result;
    }
}
